check if a string is float python

27

try:
    float(element)
except ValueError:
    print "Not a float"

Comments

Submit
0 Comments